package com.lizb.scconfigclient;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 配置中心-客户端展示API
 */
@RefreshScope
@RestController
public class TestApi {

    @Value("${myblog.name}")
    private String name;
    @Value("${myblog.url}")
    private String url;
    @Value("${myblog.location}")
    private String location;

    @RequestMapping("/test-info")
    public String getBlogInfo() {
        return "从git仓库中获取得到配置文件：【"+location+","+url+","+name+"】";
    }
}